<?php
namespace Home\Controller;
use Think\Controller;
class UservipController extends Controller{
	function reg(){
		if(!empty($_POST)){
			//数据保存
			$uservipOb=D("Uservip");
			$cRe=$uservipOb->create();
			if($cRe){
				$re=$uservipOb->add();
				if($re){
					$this->success("注册成功",U("Home/Uservip/reg"));
				}else{
					$this->error("注册失败",U("Home/Uservip/reg"));
				}
				exit();
			}else{
				$info=$uservipOb->getError();
				$this->assign('info',$info);
				//把表单输入信息传回给模板
				$this->assign('arr',$_POST);
			}
			
		}
		$this->display();
	}
	
	
	
	
}